package com.hzw.saas.web.im;


import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
import org.springframework.scheduling.annotation.EnableAsync;

@SpringBootApplication
@ComponentScan(value = "com.hzw.saas")
@EnableElasticsearchRepositories(value = "com.hzw.saas")
@EnableEncryptableProperties
@EnableAsync
public class ImApplication extends SpringBootServletInitializer  {

    public static void main(String[] args) {
//        -Djasypt.encryptor.password=hzwsaas
        SpringApplication app = new SpringApplication(ImApplication.class);
        app.setBannerMode(Banner.Mode.CONSOLE);
        app.run(args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(ImApplication.class);
    }


}
